package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 商品下架记录表
 * </p>
 *
 * @author whale
 * @since 2025-05-06
 */
@TableName("tb_product_delistings")
public class ProductDelistings extends Model<ProductDelistings> {

    private static final long serialVersionUID = 1L;

    /**
     * 下架记录唯一标识
     */
    @TableId("delist_id")
    private Long delistId;
    /**
     * 商品id
     */
    @TableField("product_id")
    private Long productId;
    /**
     * 下架原因（如库存不足、活动结束）
     */
    @TableField("delist_reas")
    private String delistReas;
    /**
     * 下架时间
     */
    @TableField("delist_time")
    private Date delistTime;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;

    public ProductDelistings() {
        this.delistId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }

    public Long getDelistId() {
        return delistId;
    }

    public void setDelistId(Long delistId) {
        this.delistId = delistId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getDelistReas() {
        return delistReas;
    }

    public void setDelistReas(String delistReas) {
        this.delistReas = delistReas;
    }

    public Date getDelistTime() {
        return delistTime;
    }

    public void setDelistTime(Date delistTime) {
        this.delistTime = delistTime;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }


    @Override
    public String toString() {
        return "ProductDelistings{" +
        ", delistId=" + delistId +
        ", productId=" + productId +
        ", delistReas=" + delistReas +
        ", delistTime=" + delistTime +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
